#include<iostream>
using namespace std;
int main() {
    int n, step;
    
    cin >> n;
    for(step=0; n != 1; step++) {
        if(n%2 == 1)
            n = 3*n+1;
        else
            n = n / 2;
    }
    cout << step << endl;
    return 0;
}